// class father {
//     name: string
//     age: number
//     sex: string
//     constructor(name: string, age: number, sex: string) {
//         this.name = name
//         this.age = age
//         this.sex = sex

//     }

//     spak = (a: string) => {
//         console.log(a);

//     }
//     eat(x: number): number {
//         return x

//     }
// }
// let f = new father("张三", 12, "男")
// console.log(f);
// f.spak("english")
// console.log(f.eat(5));



// class son extends father{
//     height:number
//     constructor(name:string,age:number,sex:string,height:number){
//         super(name,age,sex)
//         this.height=height
//     }
// }
// let s = new son("李素",18,"nv",199)
// console.log(s);




class Father {
    public name: string;
    protected age: number;
    private salary: number;
  
    constructor(name: string, age: number, salary: number){
      this.name = name;
      this.age = age;
      this.salary = salary;
    }
  
    info(){
      console.log(this.name);
      console.log(this.age);
      console.log(this.salary);
    }
  }
  
  class Son extends Father{
    constructor(name: string, age: number, salary: number){
      super(name, age, salary);
    }
  
    checkSalary(){
      console.log(this.name);
      console.log(this.age);
    }
  }
  
  let xue = new Son('xue', 26, 16000);
  
  console.log(xue.name);


export { }

